anti-analysis/anti-debugging/debugger-detection

check thread yield allowed

rule:
  meta:
    name: check thread yield allowed
    namespace: anti-analysis/anti-debugging/debugger-detection
    authors:
      - michael.hunhoff@mandiant.com
    scopes:
      static: function
      dynamic: unsupported  # requires mnemonic features
    mbc:
      - Anti-Behavioral Analysis::Debugger Detection::NtYieldExecution/SwitchToThread [B0001.015]
    references:
      - https://github.com/LordNoteworthy/al-khaser/blob/master/al-khaser/AntiDebug/NtYieldExecution.cpp
  features:
    - and:
      - api: NtYieldExecution
      - match: contain loop
      - instruction:
        - mnemonic: cmp
        - number: 0x40000024 = STATUS_NO_YIELD_PERFORMED

last edited: 2023-11-24 10:34:28